package com.eureka.feign.web;

import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import com.eureka.feign.api.SchedualServiceHi;

@RestController
@RequestMapping("/eurekaFeign")
public class EurekaFeignController {

	   @Autowired
	    SchedualServiceHi schedualServiceHi;
	  
	  /***
	   * 测试
	   * @param name
	   * @return
	   */
	    @RequestMapping(value = "/hi",method = RequestMethod.GET)
	    public String sayHi(@RequestParam String name){
	        return schedualServiceHi.sayHiFromClientOne(name);
	    }
	    
	    /**
	     * 查询用户名
	     */
	    
	    @RequestMapping(value = "/queryUserInfo")
	    private Map<String,Object> queryUserInfo(@RequestParam String username){
	    	
	      return schedualServiceHi.queryUserInfo(username);
	    	
	    	
	    }
}
